1. Field of the Invention
The present invention relates to transcoding, and more particularly to picture complexity estimation in transcoding, and target bit-allocation for controlling bit-rate during transcoding.
2. Description of the Related Art
FIG. 1 is a block diagram of an MPEG (Motion Picture Experts Group) encoder.
An MPEG encoder receives images and performs DCT (Discrete Cosine Transformation), quantization, VLC (Variable Length Coding), etc., on the images and outputs an encoded bitstream. Bit-rate control is necessary so as to make the bit-rate of the encoded bitstream constant. Generally, such bit-rate control is performed by a bit-allocation operation which determines the target number of bits to be allocated to one picture to be encoded, and a quantization value determination operation which determines quantization values on the basis of the target number of allocated bits.
For example, if it is assumed that an input image should be encoded at a bit-rate of 3 Mbps, and 30 frames, i.e., 30 pictures per second are provided, 300 kbit are allocated for one picture. This is the result of the bit-allocation operation. Then, quantization is performed. If it is assumed that 300 macroblocks exist in one picture, 1 kbit is allocated for one macroblock. Quantization values used for quantization are determined on the basis of the number of allocated bits. If the number of the allocated bits is large, the quantization value should be small. If the number of the allocated bits is small, the quantization value should be large.
Transcoding is a technique for transforming the predetermined bit-rate or size of an image into another bit-rate or size.
FIG. 2 is a block diagram used for describing a transcoding method for bit-rate transformation.
To transform the bit-rate of a bitstream coded according to the MPEG standards, an MPEG decoder 210 and an MPEG encoder 220 are required, as shown in FIG. 2. The MPEG decoder 210 receives a bitstream encoded according to the MPEG standards and decodes the bitstream, and the MPEG encoder 220 encodes the decoded image at another bit-rate.
FIG. 3 is a block diagram used for describing a transcoding method for both bit-rate and picture size transformation.
To transform picture size as well as bit-rate, a down sampler 330 is further required, as shown in FIG. 3. The down sampler 330 performs sampling of input picture data to reduce the size of the picture. In this transcoding method, an MPEG encoder 320 is provided to perform bit-rate control. For performing the bit-rate control, the MPEG encoder 320 may use a general bit-rate control method. However, it is more efficient for the MPEG encoder 320 to perform bit-rate control using various additional information output from an MPEG decoder 310.
U.S. Published Patent Application No. 2002-080877 has disclosed a technique for transcoding compressed digital video streams. As described in the above application, a transcoding apparatus includes a decoder, an encoder, and an estimator. The estimator estimates complexities of current and previous decoded pictures. The encoder performs bit-allocation for a current picture in order to maintain image quality of the new reconstructed picture. However, the disclosed conventional technique has low efficiency, because it does not use previous encoded picture information.